﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Data.XXB;
using test.EF;
using Commons.Entity;
namespace BLL.XXB
{
    public class UserService
    {
        User_InfoRepository user_InfoRepository = null;
        User_ProfileRespository user_ProfileRespository = null;
        public UserService()
        {
            user_InfoRepository = new User_InfoRepository();
            user_ProfileRespository = new User_ProfileRespository();
        }

        public List<User_Info> GetUser_Info()
        {
            return GetUser_Info(null);
        }
        public List<User_Info> GetUser_Info(PredicateList<User_Info> predicate)
        {
            var linq = from data1 in user_InfoRepository.GetModel()
                       join data2 in user_ProfileRespository.GetModel() on data1.UserID equals data2.UserID
                       select data1;
            linq = linq.LinqForPredicate(predicate);
            return linq.ToList();
        }
    }
}